package com.szt.mobile.inventory.common.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by yanzhaodi on 2017/11/21.
 */
@Entity(nameInDb = "t_account")
public class Account extends BaseEntity {

    @Id
    private Long _id;
    private String id;
    private String uid;
    private String pwd;

    public String getPwd() {
        return this.pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getUid() {
        return this.uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long get_id() {
        return this._id;
    }

    public void set_id(Long _id) {
        this._id = _id;
    }

    @Generated(hash = 2129326402)
    public Account(Long _id, String id, String uid, String pwd) {
        this._id = _id;
        this.id = id;
        this.uid = uid;
        this.pwd = pwd;
    }

    @Generated(hash = 882125521)
    public Account() {
    }

    @Override
    public boolean equals(Object o) {
        return o instanceof Account && ((Account) o).getPwd().equalsIgnoreCase(getPwd()) && ((Account) o).getUid().equals(getUid());
    }

    @Override
    public int hashCode() {
        return uid.hashCode() + pwd.hashCode();
    }
}
